package com.sfpay.merchant.auth.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.sfpay.merchant.auth.entity.system.SysUserRole;

import java.util.List;

/**
 * <p>
 * 用户和角色关联表 Mapper 接口
 * </p>
 *
 * @author fangchen
 * @since 2022-07-18
 */
public interface SysUserRoleMapper extends BaseMapper<SysUserRole> {

    /**
     * 批量新增用户角色信息
     *
     * @param userRoleList 用户角色列表
     * @return 结果
     */
    void batchUserRole(List<SysUserRole> userRoleList);

    void deleteUserRoleByUserId(Long userId);

    int countUserRoleByRoleId(Long roleId);
}
